{extend name="property/public/insidePageBase" /}
{block name="title"}工单信息详情{/block}
{block name="css"}
{__block__}
<style>
    body{
        margin:0;
    }
    .layui-iconpicker-body.layui-iconpicker-body-page .hide {display: none;}
    body .layui-iconpicker .layui-iconpicker-icon-item{
        width: 20.1%;
    }
    body{
        background-color: #ffffff;
    }
</style>
<style>
    .layui-upload-img-box {
        float:left;
        margin-bottom: 2px;
        margin-right: 2px;
        background: #e0e0e0;
        padding: 1px;
    }
    .layui-upload-img {
        width: 82px;
        height: 82px;
        margin-bottom: 1px;
    }
</style>
{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form  layui-form-pane">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-tab layui-tab-brief">
                    <!--基本信息 add-->
                    <div class="layui-form-item">
                        <div class="layui-inline"> <label class="layui-form-label">工单编号</label>
                            <div class="layui-input-block">
                                <input type="text"  value="{$info['repair_no']??''}" disabled autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline"> <label class="layui-form-label">工单类型</label>
                            <div class="layui-input-inline">
                                <input type="text" name="cate_id" id="cate-data" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline"> <label class="layui-form-label">预约时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="hope_repair_date" value="{$info['hope_date']??''} - {$info['hope_time']??''}"  placeholder="请选择预约日期"  class="layui-input laydate-type-day">
                            </div>
                        </div>
                        <div class="layui-inline"> <label class="layui-form-label">联系人</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$info['contact_name']??''}" disabled placeholder="请输入联系人"  class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline"> <label class="layui-form-label">联系电话</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$info['contact_mobile']??''}" disabled placeholder="请输入联系电话" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">工单描述 &nbsp; &nbsp;
                            <b>
                                {if $info['status'] == 1} <span style="color: red;">待处理</span>{/if}
                                {if $info['status'] == 2} <span  style="color: royalblue;">处理中</span>{/if}
                                {if $info['status'] == 3} <span style="color: #0000FF;">己处理</span>{/if}
                                {if $info['status'] == 4} <span style="color: #9cb945;">己取消</span>{/if}
                            </b>
                        </label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入工单描述" class="layui-textarea" disabled>{$info['content']??''}</textarea>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">维修前参照</label>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <div class="layui-upload-list">
                                        {foreach $info['picture'] as $k=>$v}
                                        <div class="layui-upload-img-box" id="{:md5($v)}-{$k}">
                                            <img src="{$v}" class="layui-upload-img checkPictureByImg">
                                        </div>
                                        {/foreach}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">维修后实况</label>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <div class="layui-upload-list">
                                        {foreach $info['acceptPlicture'] as $ka=>$va}
                                        <div class="layui-upload-img-box" id="{:md5($va)}-{$ka}">
                                            <img src="{$va}" class="layui-upload-img checkPictureByImg">
                                        </div>
                                        {/foreach}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <table class="layui-hide" id="assetLogsList" lay-filter="assetLogsList"></table>
                    <!--基本信息 add-->
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['laydate','table','upload', 'layCascader'], function () {
        var laydate = layui.laydate, table = layui.table,upload = layui.upload,layCascader = layui.layCascader;
        let repairId = {$info['id']};
        layCascader({
            elem: '#cate-data',
            clearable: true,
            disabled: true,
            value: {$info['cate_id'] ?? 0},
            options: {:json_encode($cateNameData,JSON_UNESCAPED_UNICODE)}
        });

        // 工单日志 add
        var tableIdAssetLogs = 'assetLogsList';
        table.render({
            elem: '#'+tableIdAssetLogs,
            id:tableIdAssetLogs,
            url: '{:url("propertyRepairOrderLogList")}?repair_id='+repairId,
            toolbar: '#toolAssetLogs',
            cols: [[
                {type: "checkbox", width: 50},
                {field: 'username', width: 120, title: '操作人员', sort: true},
                {field: 'add_time', width: 168,title: '操作时间', sort: true},
                {field: 'remark', minWidth: 120,title: '备注说明', sort: true}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            page: true,
            height: 'full-420'
        });
        // 工单日志 end
    });
</script>
{/block}